//
//  PickerQueryDataModel.swift
//  cxd4iphone
//
//  Created by hexy on 12/26/15.
//  Copyright © 2015 hexy. All rights reserved.
//

import UIKit

class PickerQueryModel: Model {

    var loansRateQuery: [PickerModel]?

    var billDateQuery: [PickerModel]?

    var loansDateQuery: [PickerModel]?

    var billStatusQuery: [PickerModel]?

    var loanInvestStatus: [PickerModel]?
    
    
    
    override func setValue(value: AnyObject?, forKey key: String) {
        
        if key == "loansRateQuery" {
            
            let array = value as! [[String: AnyObject]]
            var arrM = [PickerModel]()
            
            for dict in array {
                
                arrM.append(PickerModel(dict: dict))
            }
            
            loansRateQuery = arrM
            return
        }
        
        if key == "billDateQuery" {
            
            let array = value as! [[String: AnyObject]]
            var arrM = [PickerModel]()
            
            for dict in array {
                
                arrM.append(PickerModel(dict: dict))
            }
            
            billDateQuery = arrM
            return
        }
        if key == "loansDateQuery" {
            
            let array = value as! [[String: AnyObject]]
            var arrM = [PickerModel]()
            
            for dict in array {
                
                arrM.append(PickerModel(dict: dict))
            }
            
            loansDateQuery = arrM
            return
        }
        if key == "billStatusQuery" {
            
            let array = value as! [[String: AnyObject]]
            var arrM = [PickerModel]()
            
            for dict in array {
                
                arrM.append(PickerModel(dict: dict))
            }
            
            billStatusQuery = arrM
            return
        }
        if key == "loanInvestStatus" {
            
            let array = value as! [[String: AnyObject]]
            var arrM = [PickerModel]()
            
            for dict in array {
                
                arrM.append(PickerModel(dict: dict))
            }
            
            loanInvestStatus = arrM
            return
        }

        
        super.setValue(value, forKey: key)
        
    }

}


